# -*- coding: utf-8 -*-
'''
@File  : printurl.py
@Author: canx
@Date  : 2018/8/27 16:17
@Desc  : 
'''

import urllib.request

if __name__ == '__main__':
    url = 'http://10.0.120.7:8080/oto/view/'
    # 服务器给的响应
    response = urllib.request.urlopen(url)

    # 返回一个二进制字符串: b'',无法正常阅读
    html = response.read()

    # 进行解码操作
    code_of_html = html.decode('utf-8')

    # 打印查看网页源代码
    print(code_of_html)